<%@ page language="java" import="java.util.*" pageEncoding="UTF-8" contentType="text/html; charset=UTF-8"%>


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
   
    
    <title>修改密码</title>


<style>
#mainpart {
	position: absolute;
	top: 30%;
	left: 35%;
}



td {
	text-align: center;
	padding-top: 20px;
}

#cpass {
	margin-top: 50px;
	letter-spacing: 6px;
	color: rgb(0, 0, 0);
	font-size: 16px;
	padding-top: 10px;
	padding-bottom: 10px;
	padding-left: 25px;
	padding-right: 25px;
	border-width: 0px;
	border-color: rgb(197, 229, 145);
	border-style: solid;
	background-color: rgb(87, 217, 250);
	border-radius: 4px;
}

#cpass:HOVER {
	color: #ffffff;
	background-color: #78c300;
	border-color: #c5e591;
	cursor: hand;
}

.inp {
	height: 36px;
	border-radius: 6px;
	font-size: 18px;
	border: 1px solid #D3D3D3;
}

.inp:hover {
	border: 1px solid #48D1CC;
}
.leb{
        font-size: 16px;
		color: #1E90FF;
		letter-spacing: 6px;
}
</style>
<script type="text/javascript">
	function changepassbtn(){
		var oldpassword=document.getElementById("oldpassword");
   var newpassword=document.getElementById("newpassword");
    var newpassword1=document.getElementById("newpassword1");
  if(oldpassword.value==""||newpassword.value==""||newpassword1.value==""){
  	alert("修改密码不能存在空项!");
  	return;
  }
  if(newpassword.value!=newpassword1.value){
  	alert("两次输入的密码不一样！");
  	return;
  }
 
  document.getElementById("changeform").submit();
}
  
</script>
<%if(session.getAttribute("changefail")!=null){ %>
<script type="text/javascript">alert("请输入正确的原密码!")</script>
<%session.removeAttribute("changefail");} %>
</head>
  
  <body>
	<div id="mainpart">
		<form action="${pageContext.request.contextPath }/servlet/ChangePassServlet" id="changeform">
			<table id="innerpart">

				<tr>
					<td class="leb">旧密码：</td>
					<td><input type="password" id="oldpassword" name="oldpassword"
						class="inp"></td>
				</tr>


				<tr>
					<td class='leb'>新密码：</td>
					<td><input type="password" id="newpassword" name="newpassword"
						class="inp"></td>
				</tr>

				<tr>
					<td class='leb'>确认新密码：</td>
					<td><input type="password" id="newpassword1"
						name="newpassword1" class="inp"></td>
				</tr>


				<tr>
					<td colspan="2"><input type="button" id="cpass" name="cpass"
						value="修改密码" onclick="changepassbtn()"></td>

				</tr>

			</table>
		</form>
	</div>
</body>
</html>
